* DHS Calendar Tutorial - Example 8. * Reason for discontinuation in the last five years by method. * change to a working directory where the data are stored * or add the full path to the 'use' command below. cd "C:\Data\DHS_model". * open the events file dataset created by the 'create events file.sps'. get file="eventsfile.sav". * weight variable. compute wt=v005/1000000. weight by wt. * recode the methods to group methods together. recode ev902 (sysmis=sysmis) (1=1 /* Pill */) (2=2 /* IUD */) (3=3 /* Injection */) (11=4 /* Implants */) (5=5 /* Male condom */) (13=6 /* LAM */) (else=10 /* Other */) into method. variable labels method "Contraceptive method". print formats method (f2.0). value labels method 1 "Pill" 2 "IUD" 3 "Injection" 4 "Implants" 5 "Male condom" 6 "LAM" 8 "Periodic abstinence" 9 "Withdrawal" 10 "Other". * Other includes: Female Sterilization, Male sterilization, Other Traditional, Female Condom, * Emergency contraception, Other Modern, Standard Days Method, * Periodic Abstinence and Withdrawal * tabulate all discontinuations that occurred within the last five years. compute filter$ = (ev903 <> 0 & v008-ev901 < 60). filter by filter$. crosstabs tables=ev903 by method /cells=count column /count=asis. Crosstabs Notes |-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Output Created |31-AUG-2017 01:27:56 | |-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Comments | | |----------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Input |Data |C:\Data\DHS_model\eventsfile.sav | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |File Label |Aggregated File | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Filter |filter$ | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Weight |wt | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Split File | | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |N of Rows in Working Data File|946 | |----------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Missing Value Handling|Definition of Missing |User-defined missing values are treated as missing. | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Cases Used |Statistics for each table are based on all the cases with valid data in the specified range(s) for all variables in each table.| |-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Syntax |crosstabs tables=ev903 by method /cells=count column /count=asis. | |----------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------| |Resources |Processor Time |00:00:00.05 | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Elapsed Time |00:00:00.05 | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Dimensions Requested |2 | | |------------------------------|-------------------------------------------------------------------------------------------------------------------------------| | |Cells Available |131029 | |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| C:\Data\DHS_model\eventsfile.sav Case Processing Summary |--------------------------------------------------------|-------------------------------------------------| | |Cases | | |----------------|---------------|----------------| | |Valid |Missing |Total | | |--------|-------|-------|-------|--------|-------| | |N |Percent|N |Percent|N |Percent| |--------------------------------------------------------|--------|-------|-------|-------|--------|-------| |EV903 Discontinuation code * method Contraceptive method|1265.190|100.0% |0 |0.0% |1265.190|100.0% | |----------------------------------------------------------------------------------------------------------| EV903 Discontinuation code * method Contraceptive method Crosstabulation |---------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|--------| | |method Contraceptive method |Total | | |---------------------------|------|---------|--------|-----------|------|------| | | |Pill |IUD |Injection|Implants|Male condom|LAM |Other | | |--------------------------|-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| |EV903 Discontinuation code|Became pregnant while using |Count |36.963 |.000 |23.518 |.000 |5.482 |4.193 |12.799|82.955 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|9.1% |0.0% |4.9% |0.0% |4.5% |6.1% |18.5% |6.6% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Wanted to become pregnant |Count |119.703 |5.414 |131.537 |22.765 |34.494 |9.621 |16.031|339.564 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|29.6% |19.5% |27.3% |25.0% |28.1% |14.1% |23.2% |26.8% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Husband disapproved |Count |14.037 |.882 |6.509 |4.666 |9.508 |27.966|2.051 |65.619 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|3.5% |3.2% |1.4% |5.1% |7.7% |40.8% |3.0% |5.2% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Side effects |Count |97.680 |20.234|233.756 |54.540 |6.106 |2.473 |9.394 |424.183 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|24.2% |72.8% |48.5% |60.0% |5.0% |3.6% |13.6% |33.5% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Access/availability |Count |21.212 |.000 |5.543 |.000 |2.689 |.000 |.552 |29.996 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|5.2% |0.0% |1.2% |0.0% |2.2% |0.0% |0.8% |2.4% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Wanted more effective method |Count |80.551 |.000 |35.993 |.418 |26.714 |1.732 |14.698|160.106 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|19.9% |0.0% |7.5% |0.5% |21.7% |2.5% |21.3% |12.7% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Inconvenient to use |Count |8.345 |1.258 |6.076 |3.975 |18.159 |.000 |1.814 |39.627 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|2.1% |4.5% |1.3% |4.4% |14.8% |0.0% |2.6% |3.1% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Infrequent sex/husband away |Count |5.206 |.000 |14.485 |.000 |1.209 |6.340 |7.551 |34.791 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|1.3% |0.0% |3.0% |0.0% |1.0% |9.3% |10.9% |2.7% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Cost |Count |.287 |.000 |5.827 |2.711 |4.857 |.000 |.000 |13.682 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|0.1% |0.0% |1.2% |3.0% |4.0% |0.0% |0.0% |1.1% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Fatalistic |Count |.000 |.000 |.732 |.000 |.000 |10.373|.000 |11.105 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|0.0% |0.0% |0.2% |0.0% |0.0% |15.2% |0.0% |0.9% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Difficult to get pregnant/menopause|Count |.538 |.000 |1.148 |.563 |.000 |.000 |.000 |2.249 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|0.1% |0.0% |0.2% |0.6% |0.0% |0.0% |0.0% |0.2% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Other |Count |.566 |.000 |5.295 |.000 |.000 |.000 |1.766 |7.627 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|0.1% |0.0% |1.1% |0.0% |0.0% |0.0% |2.6% |0.6% | | |-----------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |Missing |Count |19.161 |.000 |11.523 |1.258 |13.623 |5.765 |2.356 |53.687 | | | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | | |% within method Contraceptive method|4.7% |0.0% |2.4% |1.4% |11.1% |8.4% |3.4% |4.2% | |--------------------------------------------------------------|------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| |Total |Count |404.248 |27.788|481.941 |90.896 |122.841 |68.464|69.012|1265.190| | |------------------------------------|---------------------------|------|---------|--------|-----------|------|------|--------| | |% within method Contraceptive method|100.0% |100.0%|100.0% |100.0% |100.0% |100.0%|100.0%|100.0% | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| filter off.